Process Log:
First, use the add_vacc.do code to merge the data using the basic database final_combineddata.dta. Then, use xtdpdgmm to run the ARDL model (using the data 082525_combined_with_vax.dta). The best lags of dep and indep are calculated using the best lags of combination when vacc is not used as the control variable. Also, use nlcom(use this dataset: 082525_combined_with_vax_phase2) to calculate the overall impact (stored in 082925_ARDL_coef_to Translate to IDL_summary_withoverallimpact.csv). Then, use xtreg to calculate the within r-squared using the gen pred_mob_d method (stored in 082925_xtreg within rsquare.xlsx).

Compile the coefficients of the independent and dependent variables from the xtdpdpgmm regression results and save them in 082925_ARDL_coef_to Translate to In IDL_summary_clean.xlsx, use the first section of the code 082825_ARDLtoIDL_toErlangFit.ipynb to convert the ARDL model into an IDL model (stored in 083025_IDL_equations_results_48.xlsx). Arrange the coefficients from period t-1 to period t-27, and then use the method =ABS(B2)/SUMPRODUCT(ABS($B2:$AB2)) to calculate the percentage of the corresponding period coefficient to the sum of the absolute values ​​of all coefficients to organize the results into the form of sheet 3 in 083025_final_equations_results_rearrange.xlsx. Then use the code 083025_IDLtofitErlang.R to fit the results of sheet 3 to the Erlang distribution to obtain the best fit k and delay. length (output stored in 083025_minimum_mse_results_fitingErlang.xlsx); all data are organized and stored in Table1forComparison_083025.xlsx.